<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div>

    <div class="form-group">
        <label for="c-group_type" class="control-label col-xs-12 col-sm-2">{:__('角色期限')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupTypeList}
        </div>
    </div>

    <div class="form-group" id="group_end_time" {if condition="$row.group_type == 2"} style="display: block;" {else /} style="display: none;" {/if}>
    <label for="c-group-end-time" class="control-label col-xs-12 col-sm-2">{:__('角色到期时间')}:</label>
    <div class="col-xs-12 col-sm-8">
        <div class='input-group datetimepicker' style="width: 60%">
            <input type='text' class="form-control" id="c-group-end-time" name="group_end_time" value="{$row.group_end_time|htmlentities}"/>
            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
        </div>
    </div>
    </div>

    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('性别')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[gender]', $genderData, $row['gender'], ['class'=>'form-control selectpicker gender', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}"  data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否是辅导员')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_instructor]', ['1'=>__('是'), '0'=>__('否')], $row['is_instructor'])}
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('Save')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
